package com.example.reactor;

import reactor.core.publisher.FluxSink;

public class MyListener {

    FluxSink<Object> sink;

    public MyListener(FluxSink<Object> sink) {
        this.sink = sink;
    }

    public void online(Object userName) {
        System.out.println("用户上线：" + userName);
        sink.next(userName);
    }

}
